(function (cjs, an) {

var p; // shortcut to reference prototypes
var lib={};var ss={};var img={};
lib.ssMetadata = [
		{name:"money_atlas_", frames: [[0,0,1000,1144],[715,1146,81,81],[538,1226,68,78],[867,1232,63,63],[608,1226,75,68],[884,1146,78,84],[0,1146,326,112],[328,1146,195,78],[798,1146,84,78],[328,1226,68,78],[685,1229,67,67],[468,1226,68,78],[798,1226,67,67],[398,1226,68,78],[525,1146,188,78]]}
];


// symbols:



(lib.CachedTexturedBitmap_1 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(0);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_10 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(1);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_11 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(2);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_12 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(3);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_13 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(4);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_14 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(5);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_15 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(6);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_16 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(7);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_2 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(8);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_3 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(9);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_4 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(10);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_5 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(11);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_6 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(12);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_7 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(13);
}).prototype = p = new cjs.Sprite();



(lib.CachedTexturedBitmap_8 = function() {
	this.initialize(ss["money_atlas_"]);
	this.gotoAndStop(14);
}).prototype = p = new cjs.Sprite();
// helper functions:

function mc_symbol_clone() {
	var clone = this._cloneProps(new this.constructor(this.mode, this.startPosition, this.loop));
	clone.gotoAndStop(this.currentFrame);
	clone.paused = this.paused;
	clone.framerate = this.framerate;
	return clone;
}

function getMCSymbolPrototype(symbol, nominalBounds, frameBounds) {
	var prototype = cjs.extend(symbol, cjs.MovieClip);
	prototype.clone = mc_symbol_clone;
	prototype.nominalBounds = nominalBounds;
	prototype.frameBounds = frameBounds;
	return prototype;
	}


(lib.StartButton = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_1
	this.instance = new lib.CachedTexturedBitmap_16();
	this.instance.parent = this;
	this.instance.setTransform(34.4,9.55,0.5,0.5);

	this.instance_1 = new lib.CachedTexturedBitmap_15();
	this.instance_1.parent = this;
	this.instance_1.setTransform(0,0,0.5,0.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1},{t:this.instance}]}).wait(1));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,163,56);


(lib.OutFullScreenButton_图层_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_1
	this.instance = new lib.CachedTexturedBitmap_14();
	this.instance.parent = this;
	this.instance.setTransform(4.5,2.55,0.7843,0.7843);

	this.instance_1 = new lib.CachedTexturedBitmap_13();
	this.instance_1.parent = this;
	this.instance_1.setTransform(5.45,7.2,0.7843,0.7843);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1},{t:this.instance}]}).wait(1));

}).prototype = getMCSymbolPrototype(lib.OutFullScreenButton_图层_1, null, null);


(lib.my_图层_2 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_2
	this.instance = new lib.CachedTexturedBitmap_12();
	this.instance.parent = this;
	this.instance.setTransform(1,1.6,0.5,0.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.my_图层_2, null, null);


(lib.my_图层_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_1
	this.instance = new lib.CachedTexturedBitmap_11();
	this.instance.parent = this;
	this.instance.setTransform(-0.5,-0.3,0.5,0.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.my_图层_1, null, null);


(lib.FullScreenButton_图层_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_1
	this.instance = new lib.CachedTexturedBitmap_10();
	this.instance.parent = this;
	this.instance.setTransform(0,0,0.7843,0.7843);

	this.instance_1 = new lib.CachedTexturedBitmap_13();
	this.instance_1.parent = this;
	this.instance_1.setTransform(5.45,7.2,0.7843,0.7843);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1},{t:this.instance}]}).wait(1));

}).prototype = getMCSymbolPrototype(lib.FullScreenButton_图层_1, null, null);


(lib.元件_9_图层_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_1
	this.instance = new lib.CachedTexturedBitmap_7();
	this.instance.parent = this;
	this.instance.setTransform(0,0,0.5,0.5);

	this.instance_1 = new lib.CachedTexturedBitmap_8();
	this.instance_1.parent = this;
	this.instance_1.setTransform(0,0,0.5,0.5);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance}]}).to({state:[{t:this.instance_1}]},1).wait(1));

}).prototype = p = new cjs.MovieClip();


(lib.元件_6_图层_2 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_2
	this.instance = new lib.CachedTexturedBitmap_6();
	this.instance.parent = this;
	this.instance.setTransform(0.65,2.05,0.5,0.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.元件_6_图层_2, null, null);


(lib.元件_6_图层_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_1
	this.instance = new lib.CachedTexturedBitmap_5();
	this.instance.parent = this;
	this.instance.setTransform(0,0,0.5,0.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.元件_6_图层_1, null, null);


(lib.元件_1_图层_2 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_2
	this.instance = new lib.CachedTexturedBitmap_4();
	this.instance.parent = this;
	this.instance.setTransform(0.25,1.05,0.5,0.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.元件_1_图层_2, null, null);


(lib.元件_1_图层_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_1
	this.instance = new lib.CachedTexturedBitmap_3();
	this.instance.parent = this;
	this.instance.setTransform(0,-0.8,0.5,0.5);

	this.timeline.addTween(cjs.Tween.get(this.instance).wait(1));

}).prototype = getMCSymbolPrototype(lib.元件_1_图层_1, null, null);


(lib.OutFullScreenButton = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		//var ts = this
		//ts.stop()
		//let bool = true
		//ts.qp.on("click", function () {
		//	if (bool) {
		//		//console.log(canvas.width)
		//		
		//		fullScreen(anim_container)
		//		//console.log(canvas.width)
		//		//fullScreen($("#canvas")[0])
		//		//fullScreen($("#dom_overlay_container")[0])
		//	} else {
		//		exitFullScreen()
		//	}
		//	bool = !bool
		//})
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1));

	// 图层_1_obj_
	this.图层_1 = new lib.OutFullScreenButton_图层_1();
	this.图层_1.name = "图层_1";
	this.图层_1.parent = this;
	this.图层_1.setTransform(35.1,35.5,1,1,0,0,0,35.1,35.5);
	this.图层_1.depth = 0;
	this.图层_1.isAttachedToCamera = 0
	this.图层_1.isAttachedToMask = 0
	this.图层_1.layerDepth = 0
	this.图层_1.layerIndex = 0
	this.图层_1.maskLayerName = 0

	this.timeline.addTween(cjs.Tween.get(this.图层_1).wait(1));

}).prototype = getMCSymbolPrototype(lib.OutFullScreenButton, new cjs.Rectangle(4.5,2.6,61.2,65.9), null);


(lib.my = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.stop()
		//G_drag(this)
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1));

	// 图层_1_obj_
	this.图层_1 = new lib.my_图层_1();
	this.图层_1.name = "图层_1";
	this.图层_1.parent = this;
	this.图层_1.setTransform(16.5,19.2,1,1,0,0,0,16.5,19.2);
	this.图层_1.depth = 0;
	this.图层_1.isAttachedToCamera = 0
	this.图层_1.isAttachedToMask = 0
	this.图层_1.layerDepth = 0
	this.图层_1.layerIndex = 0
	this.图层_1.maskLayerName = 0

	this.timeline.addTween(cjs.Tween.get(this.图层_1).wait(1));

	// 图层_2_obj_
	this.图层_2 = new lib.my_图层_2();
	this.图层_2.name = "图层_2";
	this.图层_2.parent = this;
	this.图层_2.setTransform(16.8,17.4,1,1,0,0,0,16.8,17.4);
	this.图层_2.depth = 0;
	this.图层_2.isAttachedToCamera = 0
	this.图层_2.isAttachedToMask = 0
	this.图层_2.layerDepth = 0
	this.图层_2.layerIndex = 1
	this.图层_2.maskLayerName = 0

	this.timeline.addTween(cjs.Tween.get(this.图层_2).wait(1));

}).prototype = getMCSymbolPrototype(lib.my, new cjs.Rectangle(-0.5,-0.3,34,39), null);


(lib.FullScreenButton = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		//var ts = this
		//ts.stop()
		//let bool = true
		//ts.qp.on("click", function () {
		//	if (bool) {
		//		//console.log(canvas.width)
		//		
		//		fullScreen(anim_container)
		//		//console.log(canvas.width)
		//		//fullScreen($("#canvas")[0])
		//		//fullScreen($("#dom_overlay_container")[0])
		//	} else {
		//		exitFullScreen()
		//	}
		//	bool = !bool
		//})
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1));

	// 图层_1_obj_
	this.图层_1 = new lib.FullScreenButton_图层_1();
	this.图层_1.name = "图层_1";
	this.图层_1.parent = this;
	this.图层_1.setTransform(32.1,31.8,1,1,0,0,0,32.1,31.8);
	this.图层_1.depth = 0;
	this.图层_1.isAttachedToCamera = 0
	this.图层_1.isAttachedToMask = 0
	this.图层_1.layerDepth = 0
	this.图层_1.layerIndex = 0
	this.图层_1.maskLayerName = 0

	this.timeline.addTween(cjs.Tween.get(this.图层_1).wait(1));

}).prototype = getMCSymbolPrototype(lib.FullScreenButton, new cjs.Rectangle(0,0,64.3,63.6), null);


(lib.fu = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// timeline functions:
	this.frame_0 = function() {
		this.stop()
	}
	this.frame_1 = function() {
		this.___loopingOver___ = true;
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(1));

	// 图层_1_obj_
	this.图层_1 = new lib.元件_9_图层_1();
	this.图层_1.name = "图层_1";
	this.图层_1.parent = this;
	this.图层_1.setTransform(17,19.5,1,1,0,0,0,17,19.5);
	this.图层_1.depth = 0;
	this.图层_1.isAttachedToCamera = 0
	this.图层_1.isAttachedToMask = 0
	this.图层_1.layerDepth = 0
	this.图层_1.layerIndex = 0
	this.图层_1.maskLayerName = 0

	this.timeline.addTween(cjs.Tween.get(this.图层_1).wait(2));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(0,0,94,39);


(lib.qian = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_1_obj_
	this.图层_1 = new lib.元件_6_图层_1();
	this.图层_1.name = "图层_1";
	this.图层_1.parent = this;
	this.图层_1.setTransform(17,19.5,1,1,0,0,0,17,19.5);
	this.图层_1.depth = 0;
	this.图层_1.isAttachedToCamera = 0
	this.图层_1.isAttachedToMask = 0
	this.图层_1.layerDepth = 0
	this.图层_1.layerIndex = 0
	this.图层_1.maskLayerName = 0

	this.timeline.addTween(cjs.Tween.get(this.图层_1).wait(1));

	// 图层_2_obj_
	this.图层_2 = new lib.元件_6_图层_2();
	this.图层_2.name = "图层_2";
	this.图层_2.parent = this;
	this.图层_2.setTransform(17.4,18.8,1,1,0,0,0,17.4,18.8);
	this.图层_2.depth = 0;
	this.图层_2.isAttachedToCamera = 0
	this.图层_2.isAttachedToMask = 0
	this.图层_2.layerDepth = 0
	this.图层_2.layerIndex = 1
	this.图层_2.maskLayerName = 0

	this.timeline.addTween(cjs.Tween.get(this.图层_2).wait(1));

}).prototype = getMCSymbolPrototype(lib.qian, new cjs.Rectangle(0,0,34.2,39), null);


(lib.qion = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_1_obj_
	this.图层_1 = new lib.元件_1_图层_1();
	this.图层_1.name = "图层_1";
	this.图层_1.parent = this;
	this.图层_1.setTransform(17,18.7,1,1,0,0,0,17,18.7);
	this.图层_1.depth = 0;
	this.图层_1.isAttachedToCamera = 0
	this.图层_1.isAttachedToMask = 0
	this.图层_1.layerDepth = 0
	this.图层_1.layerIndex = 0
	this.图层_1.maskLayerName = 0

	this.timeline.addTween(cjs.Tween.get(this.图层_1).wait(1));

	// 图层_2_obj_
	this.图层_2 = new lib.元件_1_图层_2();
	this.图层_2.name = "图层_2";
	this.图层_2.parent = this;
	this.图层_2.setTransform(17,17.8,1,1,0,0,0,17,17.8);
	this.图层_2.depth = 0;
	this.图层_2.isAttachedToCamera = 0
	this.图层_2.isAttachedToMask = 0
	this.图层_2.layerDepth = 0
	this.图层_2.layerIndex = 1
	this.图层_2.maskLayerName = 0

	this.timeline.addTween(cjs.Tween.get(this.图层_2).wait(1));

}).prototype = getMCSymbolPrototype(lib.qion, new cjs.Rectangle(0,-0.8,34,39), null);


(lib.场景_1_图层_3 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_3
	this.instance = new lib.OutFullScreenButton();
	this.instance.parent = this;
	this.instance.setTransform(749.8,74.05,0.6375,0.6375,0,0,0,0,0.1);

	this.instance_1 = new lib.FullScreenButton();
	this.instance_1.parent = this;
	this.instance_1.setTransform(749.8,14.05,0.6375,0.6375,0,0,0,0,0.1);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.instance_1},{t:this.instance}]}).wait(2));

}).prototype = p = new cjs.MovieClip();


(lib.场景_1_图层_1 = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	// 图层_1
	this.instance = new lib.CachedTexturedBitmap_1();
	this.instance.parent = this;
	this.instance.setTransform(172.6,-25.55,0.5,0.5);

	this.btn = new lib.StartButton();
	this.btn.name = "btn";
	this.btn.parent = this;
	this.btn.setTransform(400.05,490,1,1,0,0,0,81.5,28);
	new cjs.ButtonHelper(this.btn, 0, 1, 1);

	this.txt = new cjs.Text("", "30px 'FZHuaLi-M14S'", "#66FF00");
	this.txt.name = "txt";
	this.txt.lineHeight = 43;
	this.txt.lineWidth = 83;
	this.txt.parent = this;
	this.txt.setTransform(57.55,12.45);

	this.instance_1 = new lib.CachedTexturedBitmap_2();
	this.instance_1.parent = this;
	this.instance_1.setTransform(13.45,6.45,0.5,0.5);

	this.mc2 = new lib.my();
	this.mc2.name = "mc2";
	this.mc2.parent = this;
	this.mc2.setTransform(400.5,301,1,1,0,0,0,16.6,19.2);

	this.timeline.addTween(cjs.Tween.get({}).to({state:[{t:this.btn},{t:this.instance}]}).to({state:[{t:this.mc2},{t:this.instance_1},{t:this.txt}]},1).wait(1));

}).prototype = p = new cjs.MovieClip();


// stage content:
(lib.money = function(mode,startPosition,loop) {
	this.initialize(mode,startPosition,loop,{});

	this.___GetDepth___ = function(obj) {
		var depth = obj.depth;
		var cameraObj = this.___camera___instance;
		if(cameraObj && cameraObj.depth && obj.isAttachedToCamera)
		{
			depth += depth + cameraObj.depth;
		}
		return depth;
		}
	this.___needSorting___ = function() {
		for (var i = 0; i < this.getNumChildren() - 1; i++)
		{
			var prevDepth = this.___GetDepth___(this.getChildAt(i));
			var nextDepth = this.___GetDepth___(this.getChildAt(i + 1));
			if (prevDepth < nextDepth)
				return true;
		}
		return false;
	}
	this.___sortFunction___ = function(obj1, obj2) {
		return (this.exportRoot.___GetDepth___(obj2) - this.exportRoot.___GetDepth___(obj1));
	}
	this.on('tick', function (event){
		var curTimeline = event.currentTarget;
		if (curTimeline.___needSorting___()){
			this.sortChildren(curTimeline.___sortFunction___);
		}
	});

	// timeline functions:
	this.frame_0 = function() {
		this.btn = this.图层_1.btn;
		var ts = this
		ts.stop()
		G_PlayAudio("startBG", function (ad) {
			ad.play()
		})
		ts.btn.on("click", function () {
			ts.play()
		})
		fullScreen(anim_container)
		
		
		//console.log(ts.mc)
		//ts.mc.x = canvas.width
		//ts.mc.y = canvas.height
	}
	this.frame_1 = function() {
		this.btn = undefined;this.mc2 = this.图层_1.mc2;
		this.txt = this.图层_1.txt;
		this.___loopingOver___ = true;
		var ts = this
		ts.stop()
		
		G_PlayAudio("BG", function (ad) {
			ad.play()
		})
		
		
		var money = 0
		
		
		
		setInterval(function () {
			roundqion()
			roundqian()
			roundfr()
		}, 1000 * 1)
		createjs.addTick(function () {
			qionMove()
			hitqian()
			frq_yd()
		})
		
		ts.mc2.mousemove = function () {
			if (fr.length != 0 || qians.length != 0) {
				return
			}
			qions.forEach(function (e) {
				//getPot(e, ts.mc2)
				e.target = new Vector(ts.mc2.x, ts.mc2.y)
				//console.log(self.target)
			})
		}
		
		ts.mc2.mouseup = function () {
			qions.forEach(function (e) {
				setQionPot(e)
			})
		}
		
		
		
		var fr = [] //富人
		var frq = [] //富人的钱
		var qions = []
		var qians = []
		
		//钱出现的概率
			function roundqian() {
				let r = Math.random() * 10
				if (r > 1) {
					return
				}
				console.log("钱=" + r)
				let q = new lib.qian()
				q.x = Math.random() * 800
				q.y = Math.random() * 600
				ts.addChild(q)
				qians.push(q)
				//重新设置穷的位置
				setQionPot()
			}
		
			//富人出现的概率
			function roundfr() {
				//只能同时存在一个
				if (fr.length != 0) {
					return
				}
				let r = Math.random() * 10
				if (r > 0.5) {
					return
				}
				let q = new lib.fu()
				q.x = Math.random() * 800
				q.y = Math.random() * 600
				console.log(q.y + "富=" + q.x)
				ts.addChild(q)
				//当前在数组中的下表
				let len = fr.length
				fr[len] = q
				//撒钱次数
				let count = Math.floor(Math.random() * 10)
				//撒钱的间隔
				let jg = Math.random() * 10
				//每次撒出的数量
				let i = Math.floor(Math.random() * 20)
				let intval = 0
				//准备撒钱
				let itl = setInterval(function () {
					//设置撒钱对象
					AngelPots(i, q)
					intval++
					if (intval >= count) {
						clearInterval(itl);
						q.parent.removeChild(q)
						fr.splice(len, 1)
						console.log("剩下的富人=" + fr.length)
						//重新设置穷的位置
						setQionPot()
					}
				}, 1000 * jg)
				//重新设置穷的位置
				setQionPot()
			}
			//数量，和目标对象
			function AngelPots(i, target) {
				let pts = circleAngelPots(i, target)
				//console.log(pts)
				pts.forEach(function (e) {
					let q = new lib.qian()
					q.direction = (new Vector(target, e)).normal()
					q.setPosition(e)
					ts.addChild(q)
					frq.push(q)
				})
			}
			//富人发出钱后开始运动
			function frq_yd() {
				for (let i = 0; i < frq.length; i++) {
					let e = frq[i]
					e.move(e.direction)
					if (e.x >= canvas.width || e.x <= 0 || e.y > canvas.height || e.y <= 0) {
						//console.log(e)
						e.parent.removeChild(e)
						frq.splice(i, 1)
					}
				}
			}
		
		
			//穷出现的概率
			function roundqion() {
				let r = Math.random() * 10
				if (r < 1) {
					return
				}
				console.log("穷=" + r)
				let q = new lib.qion()
				q.x = Math.random() * canvas.width
				q.y = Math.random() * canvas.height
				ts.addChild(q)
				qions.push(q)
				//console.log(ts.mc2.regX)
				setQionPot(q)
			}
		
			//设置所有穷的位置
			function setQionPot(self) {
				let tg
				let dis
				if (self == undefined) {
					//设置所有的穷
					//改变所有穷的target，
					for (let i = 0; i < qions.length; i++) {
						//先判断是否有富人，在判断是否有钱，最后跟随我
						if (fr.length != 0) {
							tg = new Vector(fr[0].x - fr[0].regX, fr[0].y - fr[0].regY)
							dis = 50
		
						} else if (qians.length != 0) {
							tg = new Vector(qians[0].x - qians[0].regX, qians[0].y - qians[0].regY)
							dis = 2
						} else {
							tg = new Vector(ts.mc2.x - ts.mc2.regX, ts.mc2.y - ts.mc2.regY)
							dis = 30
						}
						qions[i].target = circlePot(dis, tg)
					}
					return
				}
		
				//先判断是否有富人，在判断是否有钱，最后跟随我
				if (fr.length != 0) {
					tg = new Vector(fr[0].x - fr[0].regX, fr[0].y - fr[0].regY)
					dis = 50
		
				} else if (qians.length != 0) {
					tg = new Vector(qians[0].x - qians[0].regX, qians[0].y - qians[0].regY)
					dis = 2
				} else {
					tg = new Vector(ts.mc2.x - ts.mc2.regX, ts.mc2.y - ts.mc2.regY)
					dis = 30
				}
				self.target = circlePot(dis, tg)
			}
		
		
		
			//与钱的碰撞
			function hitqian() {
				//我与自然产生的钱
				for (let i = 0; i < qians.length; i++) {
					//	console.log(Vector.distance(ts.mc2.getCenterPot(), qians[i].getCenterPot()))
					if (Vector.distance(ts.mc2.getCenterPot(), qians[i].getCenterPot()) <= 15) {
						qians[i].parent.removeChild(qians[i])
						qians.splice(i, 1)
						money++
						ts.txt.text = money
						setQionPot()
						break
					}
				}
				//我与富人产生的钱
				for (let i = 0; i < frq.length; i++) {
					if (Vector.distance(ts.mc2.getCenterPot(), frq[i].getCenterPot()) <= 15) {
						frq[i].parent.removeChild(frq[i])
						frq.splice(i, 1)
						money++
						ts.txt.text = money
						setQionPot()
						break
					}
				}
				//我与穷
				for (let i = 0; i < qions.length; i++) {
					if (Vector.distance(ts.mc2.getCenterPot(), qions[i].getCenterPot()) <= 15) {
						qions[i].parent.removeChild(qions[i])
						qions.splice(i, 1)
						money -= 5
						ts.txt.text = money
						setQionPot()
						break
					}
				}
				//穷与与自然产生的钱
				for (let i = 0; i < qions.length; i++) {
					for (let j = 0; j < qians.length; j++) {
						if (Vector.distance(qians[j].getCenterPot(), qions[i].getCenterPot()) <= 15) {
							qions[i].parent.removeChild(qions[i])
							qions.splice(i, 1)
		
							qians[j].parent.removeChild(qians[j])
							qians.splice(j, 1)
							setQionPot()
							break
						}
					}
				}
				//穷富人产生的钱
				for (let i = 0; i < qions.length; i++) {
					for (let j = 0; j < frq.length; j++) {
						if (Vector.distance(qions[i].getCenterPot(), frq[j].getCenterPot()) <= 15) {
							qions[i].parent.removeChild(qions[i])
							qions.splice(i, 1)
		
							frq[j].parent.removeChild(frq[j])
							frq.splice(j, 1)
							setQionPot()
							break
						}
					}
				}
			}
		
		
			//穷的移动
			function qionMove() {
				//console.log("没钱")
				qions.forEach(function (e) {
					e.moveTo(e.target, 2)
					//let pt = circlePot(30, ts.mc2)
		
				})
			}
	}

	// actions tween:
	this.timeline.addTween(cjs.Tween.get(this).call(this.frame_0).wait(1).call(this.frame_1).wait(1));

	// 图层_3_obj_
	this.图层_3 = new lib.场景_1_图层_3();
	this.图层_3.name = "图层_3";
	this.图层_3.parent = this;
	this.图层_3.setTransform(770.7,65.8,1,1,0,0,0,770.7,65.8);
	this.图层_3.depth = 0;
	this.图层_3.isAttachedToCamera = 0
	this.图层_3.isAttachedToMask = 0
	this.图层_3.layerDepth = 0
	this.图层_3.layerIndex = 0
	this.图层_3.maskLayerName = 0

	this.timeline.addTween(cjs.Tween.get(this.图层_3).wait(2));

	// 图层_1_obj_
	this.图层_1 = new lib.场景_1_图层_1();
	this.图层_1.name = "图层_1";
	this.图层_1.parent = this;
	this.图层_1.setTransform(422.6,260.4,1,1,0,0,0,422.6,260.4);
	this.图层_1.depth = 0;
	this.图层_1.isAttachedToCamera = 0
	this.图层_1.isAttachedToMask = 0
	this.图层_1.layerDepth = 0
	this.图层_1.layerIndex = 1
	this.图层_1.maskLayerName = 0

	this.timeline.addTween(cjs.Tween.get(this.图层_1).wait(2));

}).prototype = p = new cjs.MovieClip();
p.nominalBounds = new cjs.Rectangle(413.5,274.5,378.20000000000005,272);
// library properties:
lib.properties = {
	id: '24CFEE07DB89A1409F4099D92BC2CACD',
	width: 800,
	height: 600,
	fps: 24,
	color: "#000000",
	opacity: 1.00,
	manifest: [
		{src:"images/money_atlas_.png", id:"money_atlas_"}
	],
	preloads: []
};



// bootstrap callback support:

(lib.Stage = function(canvas) {
	createjs.Stage.call(this, canvas);
}).prototype = p = new createjs.Stage();

p.setAutoPlay = function(autoPlay) {
	this.tickEnabled = autoPlay;
}
p.play = function() { this.tickEnabled = true; this.getChildAt(0).gotoAndPlay(this.getTimelinePosition()) }
p.stop = function(ms) { if(ms) this.seek(ms); this.tickEnabled = false; }
p.seek = function(ms) { this.tickEnabled = true; this.getChildAt(0).gotoAndStop(lib.properties.fps * ms / 1000); }
p.getDuration = function() { return this.getChildAt(0).totalFrames / lib.properties.fps * 1000; }

p.getTimelinePosition = function() { return this.getChildAt(0).currentFrame / lib.properties.fps * 1000; }

an.bootcompsLoaded = an.bootcompsLoaded || [];
if(!an.bootstrapListeners) {
	an.bootstrapListeners=[];
}

an.bootstrapCallback=function(fnCallback) {
	an.bootstrapListeners.push(fnCallback);
	if(an.bootcompsLoaded.length > 0) {
		for(var i=0; i<an.bootcompsLoaded.length; ++i) {
			fnCallback(an.bootcompsLoaded[i]);
		}
	}
};

an.compositions = an.compositions || {};
an.compositions['24CFEE07DB89A1409F4099D92BC2CACD'] = {
	getStage: function() { return exportRoot.getStage(); },
	getLibrary: function() { return lib; },
	getSpriteSheet: function() { return ss; },
	getImages: function() { return img; }
};

an.compositionLoaded = function(id) {
	an.bootcompsLoaded.push(id);
	for(var j=0; j<an.bootstrapListeners.length; j++) {
		an.bootstrapListeners[j](id);
	}
}

an.getComposition = function(id) {
	return an.compositions[id];
}


// Layer depth API : 

AdobeAn.Layer = new function() {
	this.getLayerZDepth = function(timeline, layerName)
	{
		if(layerName === "Camera")
		layerName = "___camera___instance";
		var script = "if(timeline." + layerName + ") timeline." + layerName + ".depth; else 0;";
		return eval(script);
	}
	this.setLayerZDepth = function(timeline, layerName, zDepth)
	{
		const MAX_zDepth = 10000;
		const MIN_zDepth = -5000;
		if(zDepth > MAX_zDepth)
			zDepth = MAX_zDepth;
		else if(zDepth < MIN_zDepth)
			zDepth = MIN_zDepth;
		if(layerName === "Camera")
		layerName = "___camera___instance";
		var script = "if(timeline." + layerName + ") timeline." + layerName + ".depth = " + zDepth + ";";
		eval(script);
	}
	this.removeLayer = function(timeline, layerName)
	{
		if(layerName === "Camera")
		layerName = "___camera___instance";
		var script = "if(timeline." + layerName + ") timeline.removeChild(timeline." + layerName + ");";
		eval(script);
	}
	this.addNewLayer = function(timeline, layerName, zDepth)
	{
		if(layerName === "Camera")
		layerName = "___camera___instance";
		zDepth = typeof zDepth !== 'undefined' ? zDepth : 0;
		var layer = new createjs.MovieClip();
		layer.name = layerName;
		layer.depth = zDepth;
		layer.layerIndex = 0;
		timeline.addChild(layer);
	}
}


})(createjs = createjs||{}, AdobeAn = AdobeAn||{});
var createjs, AdobeAn;